//
//  OuptMainModel.m
//  掌上宏力
//
//  Created by admin on 2017/5/7.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "OuptMainModel.h"

@implementation OuptMainModel
/*
 \"VISIT_DATE\": \"2017/4/280: 00: 00\",
 \"VISIT_NO\": 70771,
 \"ORDINAL\": 1,
 \"ILLNESS_DESC\": \"双眼红、痒、分泌物增多2天。\",
 \"DIAG_DESC\": \"1、细菌性结膜炎\\r\\n\",
 \"DOCTOR\": \"王丽丽\",
 \"DOCTOR_NO\": \"9090\",
 \"CLINIC_LABEL\": \"眼科\",
 \"VISIT_DEPT\": \"011001\"
 */
+(OuptMainModel *)setOuptMainInfo:(NSDictionary *)dic{
    OuptMainModel *model = [[OuptMainModel alloc] init];
    NSString *dateStr = dic[@"VISIT_DATE"];
    NSString *resultDate = dateStr.length>5? [dateStr substringToIndex:(dateStr.length-8)] : dateStr;
    
    model.visitDate = resultDate;
    model.visitNo = [NSString stringWithFormat:@"%@",dic[@"VISIT_NO"]];
    model.sickDes = dic[@"ILLNESS_DESC"];
    model.doctorDes = dic[@"DIAG_DESC"];
    model.doctor = dic[@"DOCTOR"];
    model.department = dic[@"CLINIC_LABEL"];
    
    return model;
}

@end
